/*********************************
考核周期
* */
<template>
  <basic-container>
    <el-row></el-row>
    <el-row>
      <el-table
        style="width: 100%;margin-top:20px"
        :data="dataList"
        border
        stripe
        header-align="center"
        v-loading="dataListLoading"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="index" header-align="center" align="center" label="序号" width="55"></el-table-column>
        <el-table-column prop="bh" align="center" label="编号" width="140"></el-table-column>
        <el-table-column prop="sjbt" align="center" label="日常考核名称" show-overflow-tooltip></el-table-column>
        <el-table-column prop="realname" align="center" label="考核周期" show-overflow-tooltip></el-table-column>
        <el-table-column prop="realname" align="center" label="名称" show-overflow-tooltip></el-table-column>
        <el-table-column prop="realname" align="center" label="开始时间" show-overflow-tooltip></el-table-column>
        <el-table-column prop="realname" align="center" label="结束时间" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" fixed="right" min-width="120" label="操作">
          <template slot-scope="scope">
            <el-button type="primary" plain size="small" @click="addOrEdit(scope.row)">编辑</el-button>
            <el-button type="primary" plain size="small" @click="handleDelete(scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <!--分页-->
      <div class="avue-crud__pagination">
        <el-pagination
          @size-change="sizeChangeHandle"
          @current-change="currentChangeHandle"
          :current-page="pageData.pageIndex"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="pageData.pageSize"
          :total="pageData.totalPage"
          background
          layout="total, sizes, prev, pager, next, jumper"
        ></el-pagination>
      </div>
    </el-row>
  </basic-container>
</template>

<script>
export default {
  data() {
    return {
      addVisible: false,
      dataListLoading: false,
      dataList: [], //表格数组
      multipleSelection: [], //勾选数据
      pageData: {
        pageIndex: 1,
        pageSize: 10,
        totalPage: 0
      }
    };
  },
  components: {},
  methods: {
    addOrEdit(data) {
      this.addVisible = true;
      if (data) {
        this.$nextTick(() => {
          this.$refs.addNode.init(data);
        });
      } else {
        this.$nextTick(() => {
          this.$refs.addNode.init();
        });
      }
    },
    // 勾选数据
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    sizeChangeHandle() {},
    currentChangeHandle() {},
    closeDialog() {
      this.addVisible = false;
    }
  }
};
</script>

<style lang="scss">
</style>